package com.tanran.parse.controller;

import com.tanran.parse.service.ParseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Enzo Cotter on 2019/11/14.
 */
@Controller
public class ParseController {
    @Autowired
    private ParseService parseService;
    @GetMapping("xb")
    public ModelAndView parse(String id){
        ModelAndView modelAndView = new ModelAndView("parse");
        String content = parseService.parse(id);
        modelAndView.addObject("content",content);
        return modelAndView;
    }
}
